<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新增收货地址</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!--      引入js-->
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
</head>
<body style="background-color: aliceblue">

<div class="container" style=" width:1200px;margin-left:500px;margin-top: 120px">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>新增收货地址----------新增用户的收货地址</small>
                </h1>
            </div>
        </div>
    </div>

    <form action="/customer/addAddress" method="post">

        <div class="form-group">
            <div class="row">
                <div class="col-md-1"> <label>姓名：</label></div>
                <div class="col-md-3"><input th:name="getName" class="form-control" placeholder="请输入姓名" ></div>
                <div class="col-md-3"><span id="tipName" style="color: red"></span></span></span></div>
            </div>
        </div>


        <div class="form-group">
            <div class="row">
                <div class="col-md-1">  <label>电话：</label></div>
                <div class="col-md-3"> <input   th:name="getTel" class="form-control" placeholder="请输入电话" ></div>
                <div class="col-md-3"> <span id="tipTel" style="color: red"></span></span></span></span></div>
            </div>
        </div>

        <div class="form-group">
            <div class="row">
                <div class="col-md-1"><label >地址：</label></div>
                <div class="col-md-3"><input th:name="getAddress" placeholder="请输入地址" class="form-control" ></div>
                <div class="col-md-3">  <span id="tipAddress" style="color: red"></span></span></span></span></div>
            </div>
        </div>


        <div class="row">
            <div class="col-md-1"></div>

            <div class="col-md-1">
                <button class="btn btn-primary" type="submit">提交</button>
            </div>
            <div class="col-md-1">
                <a class="btn btn-primary" th:href="@{/customer/toIndexCustomer}">返回</a>
            </div>
        </div>




    </form>


</div>
<script type="text/javascript">
    var patt1 = /^[-\\+]?([0-9]+\\.?)?[0-9]+$/;//正则表达式验证是否为纯数字
    function checkCount() {
        var count =$("#count").val();
        if(count == '' && count == null){
            $("#tipCount").text("数量不能为空");
            return false;
        }else if(count < 0 || count >100){
            $("#tipCount").text("请输入正确的数量范围0-100");
            return false;
        }else if(count.match(patt1)==null){
            $("#tipCount").text("请输入正确的书籍数量");
            return false;
        }
        else{
            $("#tipCount").text("");
        }

    }


</script>


</body>
</html>